package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/10/11.
 */

public class ShowPhotoList {


    /**
     * id : 1
     * users_id : 2
     * photo : http://10.0.2.2/laravel54/public/Uploads/2017-08-31-12-58-09-59a807e1882df.jpg
     * club_id : 1
     * title : 阿斯的四道
     * num : 0
     * createtime : 0000-00-00
     * userphoto : http://10.0.2.2/laravel54/public/Uploads/2017-09-01-07-05-26-59a906b68b5b5.jpg
     * username : 戴仁k
     * clubname : 123
     */

    private int id;
    private int users_id;
    private String photo;
    private int club_id;
    private String title;
    private int num;
    private String createtime;
    private String userphoto;
    private String username;
    private String clubname;

    public static ShowPhotoList objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), ShowPhotoList.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setUsers_id(int users_id) {
        this.users_id = users_id;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public void setClub_id(int club_id) {
        this.club_id = club_id;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    public void setUserphoto(String userphoto) {
        this.userphoto = userphoto;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setClubname(String clubname) {
        this.clubname = clubname;
    }

    public int getId() {
        return id;
    }

    public int getUsers_id() {
        return users_id;
    }

    public String getPhoto() {
        return photo;
    }

    public int getClub_id() {
        return club_id;
    }

    public String getTitle() {
        return title;
    }

    public int getNum() {
        return num;
    }

    public String getCreatetime() {
        return createtime;
    }

    public String getUserphoto() {
        return userphoto;
    }

    public String getUsername() {
        return username;
    }

    public String getClubname() {
        return clubname;
    }
}
